import Router from 'vue-router'
import Home from "../pages/home.vue"
import Serch from "../pages/serch.vue"
import Shopcar from "../pages/shopcar.vue"
import Login from "../pages/user/login.vue"
import User from "../pages/user/user.vue"
import UpdataUser from "../pages/user/updataUser.vue"
import NewsList from "../pages/news/newsList.vue"
import Newsinfo from "../pages/news/newsinfo.vue"
import PhotoList from "../pages/photos/photoList.vue"
import PhotoInfo from "../pages/photos/photoInfo.vue"
import ShopList from '../pages/shop/shopList.vue'
import ShopInfo from '../pages/shop/shopInfo.vue'
import ShopImg from '../pages/shop/shopImg.vue'
import ShopComment from '../pages/shop/shopComment.vue'

import Reg from './../pages/user/reg.vue'
export default new Router({
  routes:[
    {path:"/",redirect:"/home"},
    {path:"/serch",component:Serch},
    {path:"/shopcar",component:Shopcar},
    {path:"/user/login",component:Login},
    {path:"/user/reg",component:Reg},
    {path:"/user/user",component:User},
    {path:"/user/updataUser",component:UpdataUser},





    {path:"/home",component:Home},
    {path:"/home/newsList",component:NewsList},
    {path:"/home/newsinfo/:id",component:Newsinfo},
    {path:"/home/photoList",component:PhotoList},
    {path:"/home/photoInfo/:id",component:PhotoInfo},
    {path:"/home/shopList",component:ShopList},
    {path:"/home/shopInfo/:id",component:ShopInfo},
    {path:"/home/shopInfo/img/:id",component:ShopImg},
    {path:"/home/shopInfo/comment/:id",component:ShopComment}
  ],
  linkActiveClass:"mui-active"
})